/*
    This file is part of SQLiteGTK, written by Aly Hirani

    SQLiteGTK is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    SQLiteGTK is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with SQLiteGTK.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __MAIN_WINDOW_NOTEBOOK_H__
#define __MAIN_WINDOW_NOTEBOOK_H__

typedef enum
{
	MWNPT_NONE = 0,
	MWNPT_TABLES_LIST = 1,
	MWNPT_EDITOR = 1 << 1,
	MWNPT_TABLE_EDIT = 1 << 2
} MainWindowNotebookPageType;

gboolean main_window_notebook_is_active_page_type(GtkNotebook *notebook, MainWindowNotebookPageType page_type);
gboolean main_window_notebook_is_nth_page_type(GtkNotebook *notebook, gint page_num, MainWindowNotebookPageType page_type);
MainWindowNotebookPageType main_window_notebook_get_active_page_type(GtkNotebook *notebook);
MainWindowNotebookPageType main_window_notebook_get_nth_page_type(GtkNotebook *notebook, gint page_num);
MainWindowNotebookPageType main_window_notebook_get_page_type_from_page(GtkWidget *active_page);
void main_window_notebook_set_active_page_type(GtkNotebook *notebook, MainWindowNotebookPageType page_type);
void main_window_notebook_set_nth_page_type(GtkNotebook *notebook, gint page_num, MainWindowNotebookPageType page_type);
void main_window_notebook_rename_page_label(GtkWidget *notebook_page_label, const gchar *message);
void main_window_notebook_rename_page(GtkNotebook *notebook, GtkWidget *notebook_page, const gchar *message);
void main_window_notebook_set_page_modified(GtkNotebook *notebook, GtkWidget *notebook_page, gboolean modified);
GtkWidget *main_window_notebook_create_tab_header(const gchar *title, GCallback close_button_clicked_connect, gpointer user_data);
void main_window_notebook_change_current_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data);
GtkBuilder *main_window_notebook_get_active_page_builder_from_notebook(GtkNotebook *notebook);
GtkBuilder *main_window_notebook_get_active_page_builder_from_builder(GtkBuilder *builder);
GtkBuilder *main_window_notebook_get_active_page_builder_from_user_pointer(gpointer user_data);
GtkNotebook *main_window_notebook_get_notebook_from_builder(GtkBuilder *builder);
GtkNotebook *main_window_notebook_get_notebook_from_user_data(gpointer user_data);
gboolean main_window_notebook_close_all_tabs(GtkNotebook *notebook, gpointer user_data);

#endif /* __MAIN_WINDOW_NOTEBOOK_H__ */
